package com.wanmei.service;


import com.wanmei.mapper.PermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("PermissionService")
public class PermissionService {
    @Autowired
    private PermissionMapper permissionMapper;

    /**
     * 通过角色查出来的角色Id获取角色的所有权限
     * @param roleId
     * @return
     */
    public List<String> getPermissionsNameByRoleId(int roleId){
        return  permissionMapper.getPermissionsNameByRoleId(roleId);
    }
}
